from flask import current_app

from app.models import Area
from . import html_blue


@html_blue.route(r'/')
def index():

    return current_app.send_static_file('html/index.html')
# 定义静态页面的处理
@html_blue.route(r'/<path:static_file>')
def html(static_file):
    # 判断是否是网站的logo，如果不是添加前缀

    if static_file != 'favicon.ico' and static_file != 'index':
        static_file = 'html/' + static_file
    elif static_file == 'favicon.ico' and static_file == 'index':
        static_file = 'html/' + static_file + '.html'
    return current_app.send_static_file(static_file)